/**
 * Created by user on 2018/4/12.
 */
import React, { Component } from 'react'
import { connect } from 'react-redux'

class Loading extends Component {
  render() {
    const { loading } = this.props
    return loading ? (
      <div className="loading">
        loading
      </div>
    ) : null
  }
}

const mapStateToProps = (state) => {
  return {
    loading: state.GlobalState.loading
  }
}

export default connect(mapStateToProps)(Loading)
